package com.lixin.smartclassroom.ui.home.tab5.activity

import androidx.fragment.app.Fragment
import com.lixin.smartclassroom.databinding.ActivityClassDetailBinding
import com.lixin.smartclassroom.ui.home.adapter.PagerAdapter
import com.lixin.smartclassroom.ui.home.tab1.fragment.ClassDetailChildFra
import com.lixinkeji.base.BaseActivity
import com.lixinkeji.extension.addIntArgument
import com.lixinkeji.extension.gone

/**
 * Description 活动管理
 * Author: lwc
 * Date:2023/12/11 8:44
 */
class EventManagementAct : BaseActivity<ActivityClassDetailBinding>() {
    override fun getViewBinding() = ActivityClassDetailBinding.inflate(layoutInflater)

    override fun topBarHide() = false
    override fun startPadding() = true
    override fun title() = "活动管理"


    override fun iniView() {
        binding.rlTop.gone()
        initSlidingLayout()
    }


    override fun onClick() {

    }

    private fun initSlidingLayout() {
        var titles = ArrayList<String>()
        var fragments = ArrayList<Fragment>()
        titles.add("智慧课堂")
        titles.add("主题场馆")
        titles.add("研学活动")
        fragments.add(ClassDetailChildFra().addIntArgument("type", 1).addIntArgument("fromAct",1))
        fragments.add(ClassDetailChildFra().addIntArgument("type", 2).addIntArgument("fromAct",1))
        fragments.add(ClassDetailChildFra().addIntArgument("type", 7).addIntArgument("fromAct",1))
        var mPageAdapter = PagerAdapter(supportFragmentManager, fragments, titles)

        binding.apply {
            viewPager.adapter = mPageAdapter
            tabLayout.setViewPager(viewPager)
        }
    }

}